home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 140
/
(Vol 140) Sep 19 2011.iso
/
Games
/
the-dark-age.swf
/
scripts
/
frame_355
/
DoAction.as
Wrap
Text File
|
2011-09-19
|
3KB
|
177 lines
function aturSaja()
{
gotoAndStop(266);
}
function initData()
{
msgBox_mc._visible = false;
wi = 0;
while(wi <= 9)
{
xloadData(wi);
if(cnamaData == undefined)
{
cnamaData = "Empty";
}
_root["data" + wi].data = cnamaData;
_root["data" + wi].onRollOver = overData;
_root["data" + wi].onRollOut = outData;
_root["data" + wi].onRelease = klikData;
wi++;
}
}
function overData()
{
over();
kata = new String(this);
indi = Number(kata.substr(kata.length - 1,1));
xloadData(indi);
cekData();
if(cnamaData != undefined)
{
this.gotoAndStop(3);
}
else
{
this.gotoAndStop(2);
}
}
function cekData()
{
if(cmapKe == undefined)
{
vmapKe = "-";
}
else
{
vmapKe = cmapKe;
}
if(cbykKarakter == undefined)
{
vbykKarakter = "-";
}
else
{
vbykKarakter = cbykKarakter;
}
if(ctotalMoney == undefined)
{
vtotalMoney = "-";
}
else
{
vtotalMoney = "$" + ctotalMoney;
}
if(ctotalTurn == undefined)
{
vtotalTurn = "-";
}
else
{
vtotalTurn = ctotalTurn;
}
if(ctotalKilled == undefined)
{
vtotalKilled = "-";
}
else
{
vtotalKilled = ctotalKilled;
}
}
function outData()
{
this.gotoAndStop(1);
vmapKe = "-";
vbykKarakter = "-";
vtotalMoney = "-";
vtotalTurn = "-";
vtotalKilled = "-";
}
function outData2()
{
vmapKe = "-";
vbykKarakter = "-";
vtotalMoney = "-";
vtotalTurn = "-";
vtotalKilled = "-";
}
function klikData()
{
klik();
kata = new String(this);
zindi = kata.substr(kata.length - 1,1);
this.gotoAndStop(1);
if(xjenisData == "save")
{
wi = 0;
while(wi <= 9)
{
delete _root["data" + wi].onRollOver;
delete _root["data" + wi].onRollOut;
delete _root["data" + wi].onRelease;
wi++;
}
msgBox_mc._visible = true;
msgBox_mc.dataName = _root["data" + zindi].data;
Selection.setFocus(msgBox_mc.nama);
msgBox_mc.cancel_btn.onRollOver = msgBox_mc.ok_btn.onRollOver = function()
{
over();
};
msgBox_mc.cancel_btn.onRelease = function()
{
klik();
initData();
};
msgBox_mc.ok_btn.onRelease = function()
{
klik();
namaData = msgBox_mc.dataName;
simpanData(zindi);
initData();
xloadData(zindi);
cekData();
};
}
else if(xjenisData == "load")
{
loadData(zindi);
if(keLevel != undefined)
{
gotoAndStop("xmap");
}
}
}
stop();
outData2();
initData();
if(xjenisData == "save")
{
saveload.gotoAndStop(2);
jenis_mc.gotoAndStop(1);
quit_btn.onRollOver = function()
{
over();
};
quit_btn.onRelease = function()
{
klik();
gotoAndStop("xmap");
};
}
else if(xjenisData == "load")
{
saveload.gotoAndStop(1);
jenis_mc.gotoAndStop(2);
quit_btn.onRollOver = function()
{
over();
};
quit_btn.onRelease = function()
{
klik();
trans_mc.gotoAndPlay(2);
};
}